import axios from 'axios';

//创建axios实例
export const Service = axios.create({
  baseURL: 'http://localhost:8080',
  headers:{
    'Content-Type': "application/json;charset=UTF-8"
  },
  timeout:3000
});

export const TripList = (payload)=>{
    return Service.get('/trip/pageQuery', {params: payload})
}

export const TripListById = (id)=>{
    return Service.get('/trip/listById', {params: { id }})
}

export const updateTrip = (form)=>{
    return Service.put('/trip/update', form)
}

export const deleteTrip = (id)=>{
    return Service.delete('/trip/delete/{id}', {params: { id }})
}

export const addTripList = (form_add)=>{
    return Service.post('/trip/add', form_add)
}

export const GetStart = ()=>{
    return Service.get('/trip/getStartList')
}

export const GetEnd = ()=>{
    return Service.get('/trip/endList')
}